// CreateOrOpenProjectDialog.cpp : implementation file
//

#include "stdafx.h"
#include "remotetracker.h"
#include "CreateOrOpenProjectDialog.h"
#include "MainFrm.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCreateOrOpenProjectDialog dialog


CCreateOrOpenProjectDialog::CCreateOrOpenProjectDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CCreateOrOpenProjectDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCreateOrOpenProjectDialog)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CCreateOrOpenProjectDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCreateOrOpenProjectDialog)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCreateOrOpenProjectDialog, CDialog)
	//{{AFX_MSG_MAP(CCreateOrOpenProjectDialog)
	ON_BN_CLICKED(IDC_CHOOSE_OPEN_PROJECT, OnChooseOpenProject)
	ON_BN_CLICKED(IDC_CHOOSE_CREATE_PROJECT, OnChooseCreateProject)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCreateOrOpenProjectDialog message handlers

void CCreateOrOpenProjectDialog::OnChooseOpenProject() 
{
	// TODO: Add your control notification handler code here
	EndDialog(IDOK);
	CWnd* cwnd = AfxGetMainWnd();
	
	if (cwnd != NULL)
	{
		cwnd->SendMessage(ID_FILE_OPEN);
	}
}

void CCreateOrOpenProjectDialog::OnChooseCreateProject() 
{
	// TODO: Add your control notification handler code here
	EndDialog(IDOK);
	CWnd* cwnd = AfxGetMainWnd();
	if (cwnd != NULL)
	{
		cwnd->SendMessage(ID_FILE_NEW);
	}
	
}
